Problem: What is the inverse of the function $g(x)=\dfrac{2x-1}{x+3}$ ? $g^{-1}(x) =$
Explanation: Let's start by replacing $g(x)$ with $y$. $y=\dfrac{2x-1}{x+3}$ Now let's swap $x$ and $y$ and solve for $y$. $\dfrac{2y-1}{y+3}=x$ [Why do we swap x and y?] $\begin{aligned} \dfrac{2y-1}{y+3}&=x \\\\ 2y-1&=x(y+3) \\\\ 2y-1&=xy+3x \\\\ 2y-xy&=3x+1 \\\\ y(2-x)&=3x+1 \\\\ y&=\dfrac{3x+1}{2-x} \end{aligned}$ In conclusion, this is the inverse function: $g^{-1}(x)=\dfrac{3x+1}{2-x}$ [I saw someone solve this problem by originally solving for x. Were they wrong?]